package app.anstudy.household.common;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.Toast;

public class MenuList extends Activity implements OnItemClickListener{

	EditText mEditText01;
	Button mButton01;

	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.menu);

        String[] menuArray = getResources().getStringArray(R.array.menulist);
        ListView menuList = (ListView)findViewById(R.id.menulist);
        menuList.setOnItemClickListener(this);
        menuList.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,menuArray));
        menuList.setTextFilterEnabled(true);
    }

	@Override
	public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
		// TODO Auto-generated method stub
		
		Intent intent = new Intent();
		intent.setClass(this, HouseholdActivity.class);
		intent.putExtra("menuItemNum", position);
		startActivity(intent);
		
	}

}